#include <iostream>
#include <iomanip>
using namespace std;
#include "cylinder.h"

Cylinder::Cylinder(int xValue, int yValue, double radiusValue, double highValue) : Circle(xValue, yValue, radiusValue)
{
	setHigh(highValue);
	//cout << "Cylinder constrcutor:";
	//print();
}
Cylinder::~Cylinder()
{
	//cout << "Cylinder destructor:";
	//print();
}
void Cylinder::setHigh(double value)
{
	high = (value < 0.0) ? 0.0 : value;
}
double Cylinder::getHigh() const
{
	return high;
}
double Cylinder::getCircumference() const
{
	return (2 * pi * Circle::getRadius() * Circle::getRadius() + pi * Circle::getDiameter() * getHigh());
}
double Cylinder::getVolume() const
{
	return (pi * Circle::getRadius() * Circle::getRadius() * getHigh());
}
void Cylinder::print() const
{
	Circle::print();
	cout << "High = " << getHigh() << "\n";
}
